Thore Sommer [Mon, 2 Sep 2024 08:39:46 +0000 (10:39 +0200)]
status/network: Add user permissions to new wifi connections
When creating a new NM connection they are by default system connections. A
user cannot create them if they don't have the correct polkit permissions
(org.freedesktop.NetworkManager.settings.modify.system).
If a user tried to add a new connection in the drop down menu, then they got
no password prompt and NM logged the following:
[...] audit: op="connection-add-activate" pid=1872 uid=1000 result="fail" \
reason="Insufficient privileges"
This change adds the current user to the user permissions for the new
connection, if the user has no permissions to modify the system connections,
which copies the behavior of GNOME Settings.
Jonas Ådahl [Thu, 29 Aug 2024 13:26:39 +0000 (15:26 +0200)]
ibus-candidate-popup: Scale coordinates from IBus
The coordinates are effectively in the windowing system coordinate
space, which when scaling Xwayland, we need to scale these. Do this with
the Meta.Window.protocol_to_stage() function on the focused window,
which handles it correctly for the corresponding windowing system and
configuration.
quick-settings: Handle interrupted menu animations
If the menu is closed while it is being opened, we should skip the next
animation in the chain. Similarly, if a menu is opened while it is being
closed, we should continue the animation from the previous state instead
of resetting height to 0.
After the old tool transformed into the extensions app, we added
a wrapper for compatibility with extensions that spawned the
command to open their preferences.
This was a long time ago.
As the ESM port happened since, we *know* that all extensions
are newer than that change. And as spawning the old prefs tool
is no longer accepted in review, no extension that is compatible
with current shell versions still does it.
Florian Müllner [Wed, 28 Aug 2024 10:52:05 +0000 (12:52 +0200)]
man: Port the man pages to reStructuredText
It's as human-readable as asciidoc and produces the same results,
but the tooling is more widely supported. Also both GLib and GTK
switched to it for their man pages, so rst2man is already a
dependency of the platform.
Florian Müllner [Wed, 28 Aug 2024 10:55:13 +0000 (12:55 +0200)]
build: Stop pre-generating man pages
The original asciidoc project is still stuck on python2, so on
distros that didn't switch to a fork (like Fedora), it pulls
in over 100M of legacy dependencies.
However we are about to move our man pages to reStructuredText
which doesn't have that issue, and which is already used for
GLib's and GTK's man pages.
Florian Müllner [Wed, 28 Aug 2024 13:30:50 +0000 (15:30 +0200)]
ci: Include docutils in sysext image
We need rst2man to switch from asciidoc to reStructuredText for
man pages. Pull it in ourselves until the change lands and
gnome-build-meta is updated.
Daniel Sheeler [Sat, 24 Aug 2024 16:01:20 +0000 (11:01 -0500)]
dash: Show move cursor on app icon dnd to dash
Previously, the 'copy' drag and drop cursor was displayed when dragging
an application icon to the dash (which adds the app to favorites),
but the operation is really a move, so ensure the 'move'
dnd cursor is used.
ci: Bump CI/CD component version for building system extensions
This new version allows us to specify a branch, which will be needed
soon to freeze the GNOME OS version used in stable branches e.g. once
GNOME OS 47 is available.
See https://gitlab.gnome.org/GNOME/gnome-build-meta/-/issues/872
Alessandro Bono [Mon, 19 Aug 2024 16:08:42 +0000 (18:08 +0200)]
loginDialog: Don't assume this._user is always defined
There are cases where this._user might be null when a session
is opened. This is because the user is not selected via GDM but
it is set through PAM. This happens when logging with smart card
or with credential managers, for example.
Given the session-id of the opened session, look for the owner.
This fixes the following error:
```
gnome-shell[153293]: TypeError: this._user is null
Alessandro Bono [Mon, 19 Aug 2024 16:02:04 +0000 (18:02 +0200)]
loginDialog: Get username directly from the conflicting session
The conflicting session is owned by the same user per definition.
Use the Name property of the conflicting session to get the
username instead of assuming that `this._user` is defined and
passing the username around.
Alessandro Bono [Mon, 19 Aug 2024 09:47:45 +0000 (11:47 +0200)]
loginDialog: Catch possible errors when session is opened
Since commit df84854d9073c457d79d7c2e6a5750428c52ff01 the function
_onSessionOpened() is now async. This means that if an error occurs
we get the following warning:
```
gnome-shell[1014]: Unhandled promise rejection. To suppress this
warning, add an error handler to your promise chain with .catch()
or a try-catch block around your await expression. Stack trace of
the failed promise:
_onSessionOpened@resource:///org/gnome/shell/gdm/loginDialog.js:1166:27 @resource:///org/gnome/shell/ui/init.js:21:20
```
Follow the suggestion and add a try-catch block in order to reveal
what the error is. In the catch phase, reset the faded AuthPrompt
otherwise we can't retry with another user.
Jonas Ådahl [Mon, 15 Jul 2024 19:28:58 +0000 (21:28 +0200)]
st/theme-node-drawing: Fix corner pipeline leak
The corner pipelines state theme node paint state was not necessarily
free of existing pipelines, so make sure to free them before looking up
new ones.
This avoids leaking thousands of CoglPipeline instances after toggling
the overview a bunch of times.
Fixes: e1868cab1a ("st/theme-node-drawing: Factor in border radius in update_resources()")
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3421>
We already include an .editorconfig that is supported by many
editors, including emacs, so no need to repeat an emacs-specific
modeline in every source file.
In the early days of shell development, someone accidentally pushed
their eclipse configuration. Most of it was removed at one point,
but one file was missed.
doc: Link to GNOME handbook tutorial for toolbox development
Link gnome-shell's toolbox README to the troubleshooting section
of the toolbox page at handbook.gnome.org, to make it easier to
find information on common toolbox development issues.
Tuomas Nurmi [Thu, 25 Jul 2024 07:14:22 +0000 (07:14 +0000)]
status/network: Fix enterprise network connecting from panel
Use the right variable. A static WirelessNetwork._securityTypes
variable does exist, but the correct variable when checking
autoconnect possibility is this._securityType; this._securityTypes
is undefined, causing clicking an enterprise network name in panel
network selector do nothing instead of properly opening GNOME
Settings panel.
Branch (b) calls LayoutManager._startupAnimationComplete() once the
animation is complete. Branch (c) does the same, except that
ControlsManager.runStartupAnimation() is an async function that awaits
LayoutManager.ensureAllocation().
LayoutManager._prepareStartupAnimation() is an `async` function, and its
caller catches & logs any error it raises.
Previously, ControlsManager.runStartupAnimation() – (f) in the above
diagram – was declared `async`, because it uses `await` internally, but
also accepted a callback, which was called on successful completion of
the function and the animation it triggers.
If an exception is raised during execution of the function, its callback
would never be called, and because the promise it implicitly returns is
discarded, the exception would never be logged either. And, stepping a
few levels up the call stack, the callback that
LayoutManager._startupAnimationSession() (c) provided would never be
called, and so LayoutManager._startupAnimationComplete() would never be
called, meaning the cover pane that prevents input would never be
removed and the session would be unusable.
Remove the callback parameter from ControlsManager.runStartupAnimation()
(f), and instead make it resolve in the case where the callback would
previously have been called.
Remove the callback parameter from OverviewActor.runStartupAnimation()
(e) – it is just a wrapper around ControlsManager.runStartupAnimation().
Adjust Overview.runStartupAnimation() (d) accordingly: rather than
passing a callback to OverviewActor.runStartupAnimation(), await its
return and then proceed. There is a slight behaviour change here:
previously, in the branch where this._syncGrab() is false, the callback
would be called before calling this.hide(), whereas now this.hide() is
called before the async function returns.
Adjust LayoutManager._startupAnimationSession() and its siblings to be
async, rather than each calling _startupAnimationComplete() directly.
Finally, in _prepareStartupAnimation() await _startupAnimation() either
succeeding or failing, and in either case call
_startupAnimationComplete(), removing the cover pane that prevents all
input.
Florian Müllner [Wed, 12 Jun 2024 11:13:41 +0000 (13:13 +0200)]
status/network: Show notification when detecting captive portal
When NetworkManager detects limited connectivity, we currently
pop up the portal helper window immediately. This can both be
disruptive when it happens unexpectedly, and unnoticeable
when it happens during screen lock.
In any case, it seems better to not pop up a window without
explicit user action, so instead show a notification that
launches the portal window when activated.
José Relvas [Thu, 11 Jul 2024 19:31:11 +0000 (20:31 +0100)]
screencastService: Add gstreamer pipeline for h264 low-power hw encode
VA-API low-power encoder profiles (such as vah264lpenc) reduce power consumption by relying entirely on fixed-function hardware blocks.
Use vah264lpenc over vah264enc by default, in order to save on energy and 3D engine capacity.
Signed-off-by: José Relvas <josemonsantorelvas@gmail.com>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3416>
Sebastian Wick [Wed, 24 Jul 2024 20:33:59 +0000 (22:33 +0200)]
lookingGlass: Make it possible to export the DebugControl service
Mutter has a new tool for interacting with mutter with features we don't
expose to users yet. It can be exported as a dbus service but it is not
done so by default. This adds an easy way to do so without having to
remember some JS snippet.
appDisplay: Use AppFolderDialog grabHelper to obtain key focus on popup()
When an app folder is opened it would do so without grabbing the
keyboard focus, so one could not navigate with the arrow keys without
pressing Tab. This adds the focus parameter to popup()'s grab, which
sets the key focus to the elements of the folder when it is opened.
appDisplay: Use navigate_focus() to keep focus after editing app folder title
The AppFolderDialog would lose keyboard focus after editing the title
(likely due to the folder entry grabbing key focus). This commit adds
navigate_focus() to _showFolderLabel() to send key focus back to the
dialog's elements after editing the title.
sorelz [Wed, 22 May 2024 22:24:39 +0000 (23:24 +0100)]
appDisplay: Use navigate_from_event() for keyboard focus in app folders
It wasn't possible to navigate by keyboard inside app folders due
to the focus being grabbed by the dialog. Changed vfunc_key_press_event()
to use the focus manager's navigate_from_event(), which is the same method
used by modal dialogs (also making use of the focus group already assigned
to AppFolderDialog).
> We currently complete the animation using an onComplete handler,
> which only runs if the corresponding transition was stopped when
> finished.
>
> While it is unexpected that the transition is interrupted, it can
> apparently happen under some circumstances (like VMs with qlx).
> The consequences of that are pretty bad, mainly due to the cover
> pane that prevents input during the animation not getting removed.
>
> Address this by always completing the animation when the transition
> is stopped, regardless of whether it completed or not.
There are effectively four branches of the startup animation:
1. if Meta.is_restart() is true, no animation is run on startup; I
believe this is the X11-only case of restarting the shell
mid-session.
2. if Main.sessionMode.isGreeter is true, just the panel is eased onto
the screen; this is the GDM case.
3. if Main.sessionMode.hasOverview is true, then a whole sequence of
animations are run; this is the normal session case.
4. otherwise, the whole UI zooms in to full size, and from full
transparency to full opacity; this is the Initial Setup case.
The fix above handles cases 2 and 4, but not 3. This patch applies the
same fix to case 3, so that the callback is always called on session
startup even if the transition is interrupted.
The eslint job occasionally fails because node hits an
illegal-instruction error. There's a chance that a package
update fixed that issue in the meantime, so rebuild the image.
ci: Support additional destdir in install-meson-project.sh
To build a system extension we need to:
1. Add dependencies to the container (to build it), and also
2. Add dependencies to the extension (to run it, later).
So there's effectively two locations where we need to install
those dependencies.
See https://discourse.gnome.org/t/towards-a-better-way-to-hack-and-test-your-system-components/21075
See https://gitlab.gnome.org/GNOME/gnome-build-meta/-/issues/837